@extends('layouts.admin')
@section('title','规则列表')


@section('content')

    <!-- Main content -->
    <section class="content">
      <div class="row">
        <div class="col-xs-12">
          <div class="box">
            <div class="box-header">
             <a href="{{route('admin.permission.create')}}"><button type="button" class="btn bg-maroon btn-flat margin">新增</button></a>
             <button type="button" class="btn bg-olive btn-flat margin">删除</button>
             <div class="box-tools">
                <div class="input-group input-group-sm" style="width: 150px;">
                  <input type="text" name="table_search" class="form-control pull-right" placeholder="Search">

                  <div class="input-group-btn">
                    <button type="submit" class="btn btn-default"><i class="fa fa-search"></i></button>
                  </div>
                </div>
              </div>
            </div>
            <!-- /.box-header -->
            <div class="box-body">
              <table id="example2" class="table table-bordered table-hover">
                <thead>
                <tr>
                	  <th width="16"><label><input type="checkbox" data-role="check-all"></label></th>
                    <th width="100">ID</th>
                    <th><i class="fa fa-bullhorn"></i>权限唯一标识</th>
                    <th class="hidden-phone"><i class="fa fa-question-circle"></i> 权限可读名称</th>
                    <th><i class="fa fa-bookmark"></i> 描述</th>
                    <th> 创建时间</th>
                    <th></th>
                </tr>
                </thead>
                <tbody>
                @foreach($permission as $v)
                    <tr>
                        <td><input name="ids[]" type="checkbox" class="check-box" data-role="check-item" value="{{ $v->id }}"></td>
                        <td>{{ $v->id }}</td>
                        <td><a href="basic_table.html#">{{$v->name}}</a></td>
                        <td class="hidden-phone">{{$v->display_name}}</td>
                        <td>{{$v->description}}</td>
                        <td>{{$v->created_at}}</td>
                        <!-- <td><span class="label label-info label-mini">Due</span></td> -->
                      <td>
                          
                          <a href="{{route('admin.permission.edit',[$v->id])}}" type="button" class="btn btn-info">编辑规则</a>
                          <a href="{{route('admin.permission.del',[$v->id])}}"  type="button" class="btn btn-danger ajax-get" data-confirm="确定要删除吗？" data-success="removeTr">删除</a>
                      </td>
                  </tr>
                  @endforeach
              
                </tbody>
              </table>
            </div>
            <!-- /.box-body -->
            
          </div>
          

          
     
          <!-- /.box -->
        </div>
        <!-- /.col -->
      </div>
      <!-- /.row -->
    </section>
    <!-- /.content -->
 


@endsection